//
//  HomeCollectionViewCell.m
//  YTwallet
//
//  Created by ZhangLin on 2019/2/25.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "HomeCollectionViewCell.h"
#import <Masonry.h>

@implementation HomeCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupViews];
    }
    return self;
}
-(void)setupViews
{
    CGFloat top = self.frame.size.height / 4.0;
    self.imageView = [[UIImageView alloc] init];
    [self.imageView setContentMode:UIViewContentModeScaleAspectFill];
    [self.contentView addSubview:self.imageView];
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self).offset(top);
        make.width.mas_equalTo(28);
        make.height.mas_equalTo(28);
    }];
    
    
    
    self.titleLab = [[UILabel alloc] init];
    self.titleLab.text = @"交易记录";
    self.titleLab.font = [UIFont systemFontOfSize:12.0f];
    self.titleLab.textColor = [UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1.0];
    [self.contentView addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.imageView.mas_bottom).offset(10);
    }];
}

@end
